-
-
Couldn't load subscription status.
- Fork 2.5k
Feature: Status Center — wrap long titles to 2 lines, allow resize of status center, & persist size #17806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ing; remove unused converter; bind flyout constraints and persist size
| private void ResizeGrip_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) | ||
| { | ||
| var cumulative = e.Cumulative; | ||
| var newWidth = _initialSize.Width - cumulative.Translation.X; // Negative because we're resizing from bottom-left |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The width calculation _initialSize.Width - cumulative.Translation.X is inverted for the bottom-left resize grip, causing unexpected narrowing.
Severity: HIGH | Confidence: 0.95
🔍 Detailed Analysis
When resizing the Status Center using the bottom-left grip, dragging the grip to the right (positive Translation.X) causes the panel to narrow instead of widen. This occurs because the width calculation uses _initialSize.Width - cumulative.Translation.X, which inverts the expected behavior for a left-positioned resize handle. Users cannot intuitively resize the Status Center wider by dragging the grip to the right, as the behavior is opposite to standard window resizing conventions.
💡 Suggested Fix
Change the width calculation in ResizeGrip_ManipulationDelta from var newWidth = _initialSize.Width - cumulative.Translation.X; to var newWidth = _initialSize.Width + cumulative.Translation.X; to align with standard resize behavior.
🤖 Prompt for AI Agent
Fix this bug. In src/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs at line
77: When resizing the Status Center using the bottom-left grip, dragging the grip to the
right (positive `Translation.X`) causes the panel to narrow instead of widen. This
occurs because the width calculation uses `_initialSize.Width -
cumulative.Translation.X`, which inverts the expected behavior for a left-positioned
resize handle. Users cannot intuitively resize the Status Center wider by dragging the
grip to the right, as the behavior is opposite to standard window resizing conventions.
Did we get this right? 👍 / 👎 to inform future reviews.
|
Not sure the resize glyph is required. Does the full text appear as a tooltip, when it is trimmed with an ellipsis even when over two lines? |
|
Addressing comments by @sentry-io[bot] and @mdtauk, thanks; two quick clarifications:
|
|
@abendrothj thank you for the PR. The original idea was to just wrap the text without support for manually resizing the flyout, but that said, it does look pretty cool and I don't mind discussing it further 🙂 |
|
I also want to point out #15431 which is tracking support to 'pin' the Status Center open. We haven't fully explored the idea yet, but my initial idea was for a side pane to be displayed when users pin the Status Center. If we were to do that, the resize behavior would probably be a better fit there. |
Resolved / Related Issues
Summary
Files Modified:
src/Files.App/UserControls/StatusCenter/StatusCenter.xaml— Final layout fixes: removed outer ScrollViewer, icon|star|actions header, star columnMinWidth="0", title wraps (2 lines + ellipsis), no overflowsrc/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs— Resize manipulation logic, grip handlers, settings persistencesrc/Files.App/Services/Settings/AppSettingsService.cs— AddedStatusCenterWidth/StatusCenterHeightwith defaults + persistencesrc/Files.App/Data/Contracts/IAppSettingsService.cs— Added interface members forStatusCenterWidth/StatusCenterHeightsrc/Files.App/UserControls/NavigationToolbar.xaml— Bound Flyout/FlyoutPresenter dimensions to settings; enforced min/max constraintssrc/Files.App/UserControls/NavigationToolbar.xaml.cs— Wired settings to toolbar flyout open/resize flowsrc/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256— Updated checksum generated by build toolingKey Implementation:
MaxLines="2" TextWrapping="Wrap"on header TextBlockValidation Approach
Steps used to test these changes
Screenshots/GIFs to attach
See attached screen recording:
https://github.com/user-attachments/assets/a9cbb42b-d0ab-486d-bf84-fcc85c4e8db2
Risks
Code Quality and Conventions